-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add wait_for_docker_container
helper
#235
feat: Add wait_for_docker_container
helper
#235
Conversation
There's going to be a bit of a synchro problem when generating the tests in this case, because we won't necessarily have the service to check potentially on our workstation, and for the moment not in the CI either. How can we overcome this problem? Add a lightweight service that allows a check to be made in the ci.yml? Waiting your response 😄 |
function wait_for_docker_container_task(): void | ||
{ | ||
try { | ||
run('docker run -d --rm --name helloworld alpine sh -c "echo hello world ; sleep 10"', quiet: true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is OK for CI and local ? quiet
is used to prevent showing the container ID that is random on each test generation run
Hello, Thanks for this contribution.
Thanks |
Hey ! I've corrected the feedbacks, I'm unfamiliar with working with commits squash I don't know if I've missed something? CS seems to break on a file I didn't modify and locally I have no problem to fix For PhpUnit, it's the same problem that we've already seen: the test time needs to be reduced, need to do here or in another PR ? |
I'll take care of it while merging. No worries :)
wahoo, it's all broken indeed! It looks like the latest php-cs-fixer release is broken. Don't bother with that ref: PHP-CS-Fixer/PHP-CS-Fixer#7753 EDIT this should be solved
I noticed that too. since we rely on network, it's broken sometime. I'll submit a PR for that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer this new implementation, thanks for the modifications 🙂
src/Exception/WaitFor/Docker/UnableToStartDockerContainerException.php
Outdated
Show resolved
Hide resolved
@TheoD02 I just rebased your PR and remove the exception class that was not used |
@TheoD02 I have rebased and tweaked a bit your PR. Thanks for the work ! I'm gonna merge it 🎉 |
Hey
Following the implementation of the
wait_for
feature (#216), here's what's next for the docker container that was planned as second PRThe system is more or less the same as before, but more relying on existing helpers.
I've left the
autostart
feature, so let me know if it's more suitable than the one provided in the first place. If it doesn't suit the need then I'll delete it :)